using UnityEngine;

public class UIShader_Wobble_NoGraphicRequired : MonoBehaviour
{
	public int frameDelay = 5;

	public float wobbleAmount = 5f;

	public Material TargetMaterial;

	private int currentFrame;

	private Vector2 seed;

	private void Awake()
	{
		seed = new Vector2(Random.value * 1000f, Random.value * 1000f);
	}

	private void Update()
	{
		currentFrame++;
		if (currentFrame % frameDelay == 0)
		{
			seed = new Vector2(Random.value * 1000f, Random.value * 1000f);
		}
		TargetMaterial.SetVector("_WobbleSeed", seed);
		TargetMaterial.SetFloat("_WobbleAmount", wobbleAmount);
	}
}
